package com.creative.xcx.mapper;

import com.creative.xcx.domain.MaterialType;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author ling
 * @description 素材分类类型
 * @date 2025-02-26
 */
@Mapper
public interface MaterialTypeMapper {

    /**
     * 新增
     *
     * @author ling
     * @date 2025/02/26
     **/
    Integer insert(MaterialType materialType);

    /**
     * 刪除
     *
     * @author ling
     * @date 2025/02/26
     **/
    Integer delete(String typeId);

    /**
     * 批量刪除
     *
     * @author ling
     * @date 2025/02/26
     **/

    Integer deleteBatch(String[] ids);


    /**
     * 更新
     *
     * @author ling
     * @date 2025/02/26
     **/
    Integer update(MaterialType materialType);

    /**
     * 查询 根据主键 id 查询
     *
     * @author ling
     * @date 2025/02/26
     **/
    MaterialType selectById(String typeId);

    /**
     * 查询 分页查询(带条件)
     *
     * @author ling
     * @date 2025/02/26
     **/
    List<MaterialType> selectMaterialTypeList(MaterialType materialType);

    /**
     * 批量刪除
     *
     * @author ling
     * @date 2025/02/26
     **/
    List<MaterialType> exportBatch(String[] ids);

    /**
     * 获取素材类型列表
     *
     * @return {@link List }<{@link MaterialType }>
     * @author ling
     * @date 2025/03/06
     */
    List<MaterialType> selectTypeList();

    /**
     * 统计素材分类数量
     *
     * @return {@link Long }
     * @author ling
     * @date 2025/04/28
     */
    Long calculateMaterialType();
}
